package com.example.demo.tools;

import com.example.demo.domain.Student;

import java.util.List;

public class TJosn {
    public TJosn(List<Student> myAll) {
        this.list = myAll;
    }

    private List<Student> list;
    public String toJson() {
        String result = "{";
        String temp = "";
        for(Student student:list) {
            temp = student.toString();
        }
        result+=temp;
        result+="}";
        return result;
    }
}
